Optimal. Leaf size=73 \[ \frac{a (4 A-B) \tan ^3(c+d x)}{15 d}+\frac{a (4 A-B) \tan (c+d x)}{5 d}+\frac{(A+B) \sec ^5(c+d x) (a \sin (c+d x)+a)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0729733, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.069, Rules used = {2855, 3767} \[ \frac{a (4 A-B) \tan ^3(c+d x)}{15 d}+\frac{a (4 A-B) \tan (c+d x)}{5 d}+\frac{(A+B) \sec ^5(c+d x) (a \sin (c+d x)+a)}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2855
Rule 3767
Rubi steps
\begin{align*} \int \sec ^6(c+d x) (a+a \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac{(A+B) \sec ^5(c+d x) (a+a \sin (c+d x))}{5 d}+\frac{1}{5} (a (4 A-B)) \int \sec ^4(c+d x) \, dx\\ &=\frac{(A+B) \sec ^5(c+d x) (a+a \sin (c+d x))}{5 d}-\frac{(a (4 A-B)) \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{5 d}\\ &=\frac{(A+B) \sec ^5(c+d x) (a+a \sin (c+d x))}{5 d}+\frac{a (4 A-B) \tan (c+d x)}{5 d}+\frac{a (4 A-B) \tan ^3(c+d x)}{15 d}\\ \end{align*}
Mathematica [B] time = 1.2376, size = 223, normalized size = 3.05 \[ \frac{a \sec (c) (-54 (A+B) \cos (c+d x)+18 A \sin (2 (c+d x))+9 A \sin (4 (c+d x))+128 A \sin (2 c+3 d x)-18 A \cos (3 (c+d x))+128 A \cos (c+2 d x)+64 A \cos (3 c+4 d x)+384 A \sin (d x)+18 B \sin (2 (c+d x))+9 B \sin (4 (c+d x))-32 B \sin (2 c+3 d x)-18 B \cos (3 (c+d x))-32 B \cos (c+2 d x)-16 B \cos (3 c+4 d x)+240 B \cos (c)-96 B \sin (d x))}{960 d \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )^5 \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.099, size = 102, normalized size = 1.4 \begin{align*}{\frac{1}{d} \left ({\frac{aA}{5\, \left ( \cos \left ( dx+c \right ) \right ) ^{5}}}+aB \left ({\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{5\, \left ( \cos \left ( dx+c \right ) \right ) ^{5}}}+{\frac{2\, \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{15\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}} \right ) -aA \left ( -{\frac{8}{15}}-{\frac{ \left ( \sec \left ( dx+c \right ) \right ) ^{4}}{5}}-{\frac{4\, \left ( \sec \left ( dx+c \right ) \right ) ^{2}}{15}} \right ) \tan \left ( dx+c \right ) +{\frac{aB}{5\, \left ( \cos \left ( dx+c \right ) \right ) ^{5}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.04565, size = 116, normalized size = 1.59 \begin{align*} \frac{{\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} A a +{\left (3 \, \tan \left (d x + c\right )^{5} + 5 \, \tan \left (d x + c\right )^{3}\right )} B a + \frac{3 \, A a}{\cos \left (d x + c\right )^{5}} + \frac{3 \, B a}{\cos \left (d x + c\right )^{5}}}{15 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.73992, size = 259, normalized size = 3.55 \begin{align*} -\frac{2 \,{\left (4 \, A - B\right )} a \cos \left (d x + c\right )^{4} -{\left (4 \, A - B\right )} a \cos \left (d x + c\right )^{2} -{\left (A - 4 \, B\right )} a +{\left (2 \,{\left (4 \, A - B\right )} a \cos \left (d x + c\right )^{2} +{\left (4 \, A - B\right )} a\right )} \sin \left (d x + c\right )}{15 \,{\left (d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - d \cos \left (d x + c\right )^{3}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.28708, size = 304, normalized size = 4.16 \begin{align*} -\frac{\frac{5 \,{\left (15 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 9 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 24 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 12 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 13 \, A a - 7 \, B a\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1\right )}^{3}} + \frac{165 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 45 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 480 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 60 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 650 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 70 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 400 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 20 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 113 \, A a + 13 \, B a}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1\right )}^{5}}}{120 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]